<template>
    <div>
        <h1 ref="gainRef">使用refs</h1>
        <button @click="add">请点击我</button>
    </div>
</template>

<script>
    export default {
        name : 'Heater',
        methods:{
            add(){
                console.log(this.$refs.gainRef);
            }
        }
    }
</script>

<style lang="scss" scoped>

</style>